#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>

void mysys(char *command)
{
    pid_t pid;
    pid = fork();
    if (pid == 0) {
        execl("/bin/sh", "sh", "-c", command, NULL);
    } else {
        wait(NULL);
    }
}

int main()
{
    printf("--------------------------------------------------\n");
    mysys("echo HELLO WORLD");
    printf("--------------------------------------------------\n");
    mysys("ls /");
    printf("--------------------------------------------------\n");
    return 0;
}
